Low latency enumeration endec

ABSTRACT

Various embodiments of the present invention provide apparatuses and methods for encoding and decoding data.

BACKGROUND

Various products including hard disk drives utilize a read channel device to retrieve information from a medium and decode and convert the information to a digital data format. Such read channel devices may include data processing circuits including encoder and decoder circuits or endecs to encode and decode data as it is stored and retrieved from a medium or transmitted through a data channel, in order to reduce the likelihood of errors in the retrieved data. It is important that the read channel devices be able to rapidly and accurately decode the original stored data patterns in retrieved or received data samples.

Typically, data is encoded and stored or transmitted from most significant bit (MSB) to least significant bit (LSB), and decoded in the opposite order. Because the data is decoded in the reverse order from the encoding and the retrieval or reception, data is buffered before the decoding process begins. This introduces a long latency, particularly when the block of data being encoded and decoded is long.

Thus, for at least the aforementioned reason, there exists a need in the art for reducing latency in data processing circuits.

BRIEF SUMMARY

Various embodiments of the present invention provide apparatuses and methods for encoding and decoding data. For example, a storage system is disclosed that includes a storage system with a storage medium maintaining a data set, a read/write head assembly operable to write the data set to the storage medium and to read the data set from the storage medium, a maximum transition run encoder operable to encode the data set before it is written to the storage medium and a decoder operable to decode the data set after it is read from the storage medium. The encoder includes a prohibited pattern detector, an enumeration encoder, and a prohibited pattern replacement circuit. The prohibited pattern detector is operable to detect a prohibited bit pattern in a stream of data bits from the data set. The enumeration encoder is operable to encode the stream of data bits using a change of base in a representation of the stream of data bits with periodic bases and to constrain an encoded output to a maximum transition run to yield an encoded stream of data bits. The prohibited pattern replacement circuit is operable to replace a block of bits in the encoded data bits corresponding to at least a portion of the prohibited bit pattern in the stream of data bits with a sync pattern to yield a second encoded stream of data bits as an output of the encoder. The decoder includes a sync pattern detector, an enumeration decoder and a sync pattern replacement circuit. The sync pattern detector is operable to detect the sync pattern in a retrieved encoded stream of data bits from the data set. The enumeration decoder is operable to decode the retrieved encoded stream of data bits in a same bit significance direction as the encoded stream of data bits was encoded to yield a decoded stream of data bits. The sync pattern replacement circuit is operable to replace a block of bits in the decoded stream of data bits corresponding to the sync pattern in the encoded stream of data bits to yield a second decoded stream of data bits as the decoder output.

In some embodiments of the storage system, the encoder also includes a long zero run detector operable to detect a run of zeros exceeding a zero run limit in the second encoded stream of data bits, and a long zero run replacement circuit operable to replace the run of zeros in the second encoded stream of data bits with a second sync pattern to yield a third encoded stream of data bits.

In some embodiments of the storage system, the sync pattern detector is operable to detect the second sync pattern in the encoded stream of data bits. The decoder also includes a second sync pattern replacement circuit operable to replace the second sync pattern in the retrieved encoded stream of data bits with a long zero run to yield a second encoded stream of data bits. The enumeration decoder is operable to decode the second encoded stream of data bits derived from the retrieved encoded stream of data bits.

In some embodiments of the storage system, the decoder also includes a base elements memory operable to supply enumeration base elements used to encode the encoded stream of data bits, a first accumulator and shifter circuit operable to accumulate the enumeration base elements, a second accumulator and shifter circuit operable to accumulate and shift an output from the first accumulator and shifter circuit to yield the decoded stream of data bits, and a multiplexer operable to provide the enumeration base elements from the base elements memory and zero values to the first accumulator and shifter circuit. In some instances, the base elements memory is operable to index the enumeration base elements based on a position of individual bits shifted in from the second encoded stream of data bits.

This summary provides only a general outline of some embodiments according to the present invention. Many other objects, features, advantages and other embodiments of the present invention will become more fully apparent from the following detailed description, the appended claims and the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

A further understanding of the various embodiments of the present invention may be realized by reference to the figures which are described in remaining portions of the specification. In the figures, like reference numerals may be used throughout several drawings to refer to similar components. In the figures, like reference numerals are used throughout several figures to refer to similar components. In some instances, a sub-label consisting of a lower case letter is associated with a reference numeral to denote one of multiple similar components. When reference is made to a reference numeral without specification to an existing sub-label, it is intended to refer to all such multiple similar components.

FIG. 1 depicts a block diagram of a read channel which may be used to store and retrieve or transmit and receive data in accordance with various embodiments of the present invention;

FIG. 2 depicts a block diagram of an encoder suitable for use in a read channel in accordance with various embodiments of the present invention;

FIG. 3 depicts a trellis diagram illustrating state changes in user data bits;

FIG. 4 depicts a finite state transition diagram (FSTD) for a maximum transition run (MTR) of three;

FIGS. 5A and 5B depict an example process of encoding the decimal number 30 into a binary representation and a binary Fibonacci representation;

FIG. 6 depicts a flow diagram showing a method for encoding data in accordance with various embodiments of the present invention;

FIG. 7 depicts a block diagram of a decoder suitable for use in a read channel in accordance with various embodiments of the present invention;

FIG. 8 depicts a flow diagram showing a method for decoding data in accordance with various embodiments of the present invention;

FIG. 9 depicts a storage system including an encoder and decoder in accordance with some embodiments of the present invention; and

FIG. 10 depicts a wireless communication system including an encoder and decoder in accordance with some embodiments of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

Various embodiments of the present invention are related to apparatuses and methods for encoding and decoding data, and more particularly to encoding and decoding data in the same order to reduce latency. An enumerative or enumeration encoder and corresponding decoder are disclosed that enable that very rate-efficient coding solutions, while decoding in the same direction as the encoding, from MSB to LSB, to avoid the latency resulting from storing the entire codeword on either the encoding or decoding side. Thus, only finite latency is required to encode and decode for any codeword size. To prevent carry-overs from LSB to MSB in the decoder, the encoder and decoder include carryover cancellation, using pattern replacements in the encoder and replaced pattern restoration in the decoder.

Although the encoder and decoder disclosed herein are not limited to any particular application, they may be used for example in a read channel of a storage device. Turning to FIG. 1, a read channel 100 is used to process user data bits 102, store them in or transit them through a storage or transmission channel 104 and retrieve the user data bits 106 without introducing errors. The user data bits 102 are processed in an MTR encoder 110, implemented as an enumerative encoder that supports the Maximum Transition Run (MTR) constraint. The frequency response of the read channel 100 is generally at a maximum at DC and degrades near the Nyquist frequency, particularly when the storage or transmission channel 104 is a magnetic storage device. By limiting the maximum transition run length in the encoded user bits 112, the read channel 100 operates below the Nyquist frequency and avoids errors that might be introduced by the degraded frequency response near the Nyquist frequency. The MTR encoder 110 also replaces patterns in the encoded user bits 112 that would lead to carry-overs when decoding the encoded user bits 112, supporting decoding from MSB to LSB. In addition, the MTR encoder 110 also replaces long zero run patterns in the encoded bits that would cause degraded behavior of control loops at the decoder side.

The encoded user bits 112 are provided to a low density parity check (LDPC) encoder 114, which produces parity bits 116 for the encoded user bits 112. The parity bits 116 are combined with the encoded user bits 112 in a multiplexer 120, and the resulting data is stored in or transmitted through storage or transmission channel 104.

The data retrieved or received from the storage or transmission channel 104 and is processed in a detector 122. Additional components may be included as is known before and after the storage or transmission channel 104. For example, if the storage or transmission channel 104 is a magnetic hard disk drive, an analog front end may be included to amplify and filter an analog signal from the magnetic hard disk drive, followed by an analog to digital converter to sample the analog signal and provide a digital bit stream. Filtering components may also be included, such as a digital finite impulse response filter, to filter the signal to the detector 122.

The detector 122 may be any detector circuit known in the art including, but not limited to, a Viterbi algorithm detector circuit or a maximum a posteriori detector circuit. Based upon the disclosure provided herein, one of ordinary skill in the art will recognize a variety of detector circuits that may be used in relation to different embodiments of the present invention. Detector circuit 122 performs a data detection process on the received input from the storage or transmission channel 104 resulting in a detected output 124. The detected output 124 is provided to a decoder such as an LDPC decoder 126 which performs parity checks on the detected output 124, ensuring that parity constraints established by the LDPC encoder 114 are satisfied in order to detect and correct any errors that may have occurred in the data while passing through the storage or transmission channel 104 or other components of the read channel 100. Other error detection and correction encoders and decoders may be used in the read channel 100 in place of the LDPC encoder 114 and LDPC decoder 126, and one of ordinary skill in the art will recognize a variety of error detection and correction encoders and decoders that may be used in relation to different embodiments of the present invention. In the case of the LDPC encoder 114 and LDPC decoder 126, the detector 122 and LDPC decoder 126 may operate in an iterative fashion, with extrinsic information 130 passed from the LDPC decoder 126 to the detector 122 to aid in the data detection and parity check process. The LDPC decoder 126 yields encoded user bits 132 retrieved from the storage or transmission channel 104, with the parity bits removed after the combination of encoded user bits and parity bits satisfy the parity check constraints.

The encoded user bits 132 from the LDPC decoder 126 are provided to an MTR decoder 134 which reverses the enumerative encoding performed by the MTR encoder 110. In particular, the MTR decoder 134 decodes the encoded user bits 132 in the same order as the MTR encoder 110 encodes the user data bits 102, from MSB to LSB, greatly reducing the latency of decoding large blocks of data. The MTR decoder 134 yields user data bits 106, which should be identical to user data bits 102 if the data is not corrupted in the storage or transmission channel 104 beyond the capacity of the detector 122 and LDPC decoder 126 to correct.

Turning to FIG. 2, an MTR encoder 200 is illustrated in accordance with some embodiments of the invention and which may be suitable for use, along with other embodiments, as the MTR encoder 110 of FIG. 1. The MTR encoder 200 may be adapted to limit the maximum transition run-length to any run-length, such as three. The maximum transition run-length is also referred to as a j-constraint, with the output of an MTR(j) encoder constrained such that the maximum transition run-length in the output sequence does not exceed j transitions in the non-return to zero (NRZ) domain, or correspondingly, j “1”s in the non-return to zero inverted (NRZI) domain. Thus, the output of an MTR(3) encoder should not exceed 3 transitions in a row. This is illustrated in the trellis diagram 300 of FIG. 3, in which states correspond to NRZ bit values, and transitions between states correspond to NRZI transition values. The trellis diagram 300 is applicable to any data bits, such as the user bits 202 at the input to an enumerative encoder 204 or encoded bits at an output 206 of the enumerative encoder 204 in FIG. 2. The trellis diagram 300 of FIG. 3 is a two-state trellis, with three consecutive data bit transitions illustrated. A series of three transitions 302, 304 and 306 illustrate the alternating states generated by a one, one, one sequence in the NRZI domain, which would be the maximum allowable transition run-length in an MTR(3) encoder and which would be prohibited in an MTR(2) encoder.

In the NRZ domain, data bits are represented by physical electrical states, such as a high voltage for a ‘1’ and a low voltage for a ‘0’. In the NRZI domain, transitions in data bits are represented by the physical electrical state, such as a high voltage for a transition or a changing bit value and a low voltage for no transition or a constant bit value. Thus, a ‘1’ in the NRZI domain indicates that the associated bit value in the NRZ domain transitions either from ‘0’ to ‘1’ or from ‘1’ to ‘0’, and a ‘0’ in the NRZI domain indicates that the associated bit value in the NRZ domain stays constant at either a ‘0’ or a ‘1’.

Turning to FIG. 4, the limited transitions of an MTR(3) encoder may also be illustrated by a finite state transition diagram (FSTD) 400, which illustrates transitions in the NRZI domain. The FSTD 400 includes four states 402, 404, 406, and 410. A ‘1’ in the NRZI domain causes a transition (e.g., 412) from one state (e.g., 402) to the next (e.g., 404). When in state 402, a ‘0’ transitions back to state 402 and a ‘1’ transitions to state 404. When in state 404, a ‘0’ transitions back to state 402 and a ‘1’ transitions to state 406. When in state 406, a ‘0’ transitions back to state 402 and a ‘1’ transitions to state 410. Because of the j-constraint of the MTR(3) encoder, a ‘1’ transition when in state 410 is forbidden. Thus, an MTR(3) encoder is limited to three consecutive transitions in the NRZ domain or ‘1’ values in the NRZI domain.

The Shannon capacity λ or information rate of an MTR(j) constrained encoder is defined as λ=lim_(n→∞) log₂(B(n))/n, where B(n) is the number of MTR(j)-constrained sequences of length n. For large n, B(n)˜2^(nλ). For MTR(j), B(n) can be derived as a set of Fibonacci numbers, numbers defined as sums of preceding numbers in the series. For example, for MTR(3), the respective sequence of Fibonacci numbers is defined by the recurrence B(n)=B(n−1)+B(n−2)+B(n−3)+B(n−4). This recurrence is also illustrated in FIG. 4, where the loop of length “k” that begins and ends at zero state corresponding to recurrence term B(n−k). For example, the loop of length 3 passing through states 0,1,2 corresponds to the term B(n−3) in this Fibonacci recursion. By substituting B(n)−2^(nλ), where ˜ means asymptotic equality up to some constant factor, and λ denotes the constraint capacity, we get from Fibonacci recursion the following equation: 2^(4λ)=2^(3λ), +2^(2λ), +2^(λ)+1, giving capacity λ of about 0.946777 for MTR(3) modulation encoding.

The enumerative encoder 204 in MTR encoder 200 uses encoding with limited periodic basis, with encoding rate approaching the capacity of MTR(3) constraint, while enabling a decoder to decode the encoded data from the enumerative encoder 204 from MSB to LSB, reducing latency. Enumerative decoding refers to a change of base in the representation of the same integer. Although examples of periodic basis are disclosed herein for the enumerative encoding, the enumerative encoder and decoder are not limited to any particular numeric basis for encoding.

Before moving to the periodic basis used in some embodiments of the enumerative encoder 204, encoding with a Fibonacci series will be described to illustrate how the j-constraint, which prevents transition runs of length >j, is supported, using example of j=3 constraint in the MTR(3) encoder case. In enumerative encoding of Fibonacci numbers, the enumerative encoding is a change of base from binary representation to binary Fibonacci representation according to Equation 1:

$\begin{matrix} {A = {{\sum\limits_{i = 1}^{K}{{x(i)} \cdot 2^{K - i}}} = {\sum\limits_{i = 1}^{N}{{y(i)} \cdot {B\left( {N - i} \right)}}}}} & {{Equation}\mspace{14mu} 1} \end{matrix}$

where x(i), y(i)={0,1}, and B(N−i) are Fibonacci weights.

When used in binary representations, Fibonacci weights have some redundant states, but they provide a unique way to encode into the constrained sequence to prevent long runs of ‘1’s. Thus, by precoding user data to the NRZI domain and using enumerative encoding that applies a j-constraint to prevent long runs of ‘1’s, excessive runs of transitions in the NRZ domain are prevented, and the system avoids the Nyquist region of operation with its degraded frequency response. For any j-constraint, a Fibonacci series is derived from constraint graph connections, similar to that in the example of the MTR(3)-constraint and the graph of FIG. 4. For example, the series of Fibonacci weights or Fibonacci basis for the MTR(3) constraint may be B(1)=1; B(2)=2; B(3)=4; B(4)=8; B(n)=B(n−1)+B(n−2)+B(n−3)+B(n−4) for n>4. Thus, B(n)={1, 2, 4, 8, 15, 29, 56, 108 . . . }. In contrast, the binary weights for a binary sequence are B(n)={1, 2, 4, 8, 16, 42, 64, 128 . . . }, which form a basis in binary representation.

The process of encoding the decimal number 30 into the binary system (binary weight) representation is illustrated in FIG. 5A. A column of base elements 500 is used as divisors for the input column 502. Because the initial input 30 is divisible by the largest shown base element 16, a 1 is produced at the top of the output column 504. When base element 16 is subtracted from input 30, a remainder of 14 is left at the top of the remainder column 506. The remainder 14 is divisible by the next base element 8 and leaves a remainder of 6. Remainder 6 is divisible by the next base element 4 and leaves a remainder of 2. Remainder 2 is divisible by the next base element 2 and leaves a remainder of 0. Remainder 0 is not divisible by the next base element 1, so base element 1 is multiplied by 0 before subtracting from the remainder 0. The encoded output of the decimal input 30 is ‘11110’ in binary representation, if represented in binary basis. In the NRZI domain, this produces a run of four transitions, which is prohibited in the MTR(3) encoder. Notably, the encoding process is performed in MSB to LSB order 510.

In contrast, the process of encoding the decimal number 30 into a binary Fibonacci representation is illustrated in FIG. 5B. A column of Fibonacci base elements 520 is used as divisors for the input column 522. Because the initial input 30 is divisible by the largest shown base element 29, a 1 is produced at the top of the output column 524. When base element 29 is subtracted from input 30, a remainder of 1 is left at the top of the remainder column 526. The remainder 1 is not divisible by any of the following 4 bases, 15, 8, 4 and 2, resulting in 4 successive ‘0’s in the output column 524. The remainder 1 is divisible by the last base element 1, leaving a remainder of 0. The encoded output of the decimal input 30 is ‘100001’ in binary Fibonacci representation with the bases listed above. In the NRZI domain, this produces no runs of transitions.

The number of bases used in the enumerative encoding may be any of a variety of suitable candidates. In some embodiments, the enumerative encoder 204 implements a 17/18 code using 18 8-bit elements B(n), with one modulation bit position at n=0, according to Table 1:

TABLE 1 n B(n) n B(n n B(n) 0 0 × FC 6 0 × C8 12 0 × 9F 1 0 × F3 7 0 × C1 13 0 × 99 2 0 × E9 8 0 × B9 14 0 × 93 3 0 × E1 9 0 × B2 15 0 × 8D 4 0 × D8 10 0 × AB 16 0 × 88 5 0 × D0 11 0 × A5 17 0 × 83

The variable n denotes a periodic index for periodic sequence B(n), which is incremented or decremented modulo 18. The order of n is in reverse, such that if y(0), y(1), . . . y(N−1) is the encoder output sequence, then B(n_ini), B(n_ini−1), . . . B(0) are the corresponding weights or bases used to determine the y-values, and n_ini=N−1 modulo 18.

In some embodiments of the enumerative encoder 204, a state variable S is an s+1=9-bit integer. Base elements are used in reverse order compared to Fibonacci enumeration, with the highest basis element coming first. To initialize the encoding process, s input bits x(k) are fed into the state variable, after which input bits x(k) are shifted in while generating output bits y(n) and subtracting the base elements from the state S, as shown in the following example pseudo-code:

Initialization (0 ≦ k < s): S ← (S << 1) | x(k) Recursion (0≦n<N): y(n) = (S ≧ B(N − n − 1)) Generate output bit S ← (S − y(n) ·B(N − n − 1)) Subtraction of base element from state if (k ≦ K) & (Δ(N − n − 1) == 0) S ← (S << 1) | x(k) State shift, update with input bit k = k + 1 endif

The first user block is 16 bits, one shorter than the regular 17-bit block. After feeding a user sector to the encoder, the encoding trellis tail is terminated or flushed by feeding 9 or 8 zeros to the encoder input, where only 8 bits are needed in the case when the last bit of the encoded sector is a modulation bit. At the sector start, the encoder does not need to know the sector size, and at sector end, the encoder terminates the sector without a need for padding bits.

The 17/18 code has a very small rate gap to constraint capacity: λ_(MTR(3))−λ_(17/18). The 17/18 code thus approaches the capacity rate of MTR(3). Because of this gap, there are some sequences which satisfy MTR(3) constraints but which never occur in the 17/18 code. These sequences may be used as sync patterns in the encoded data to replace encoded data sequences that would cause carry-overs, enabling the enumerative encoder 204 to use a finite length accumulator regardless of encoder data size. This enables the decoder to decode the encoded data in the same bit significance direction as the encoder, from MBS to LSB, eliminating the latency of storing the encoded data before beginning the decoding process. Other code rates p/q≦λ (λ-constraint capacity) may be used. For any such code the output dimension N is calculated from the input dimension K as N=K+ceil(q*K/p), but this formula may be adjusted based on implementation-specific details. For example, for 17/18 code, due to periodic base implementation a more accurate expression N=K+ceil(K−16)/17)+1 is achieved.

Turning again to FIG. 2, a prohibited pattern detector 210 is used to detect a bit pattern in the user bits 202 that will cause a long carry-over in the enumerative decoder (700, FIG. 7) beyond the accumulator/shifter length. In the 17/18 encoder, the prohibited pattern detector 210 detects the presence of prohibited bit pattern ‘1000000000000000000000000000 . . . ’ (27 or more zeros, or 28 or more zeros after the preceding prohibited bit pattern)”. When the prohibited pattern detector 210 detects the presence of the prohibited bit pattern at the user bits 202, it causes a multiplexer 212 to replace the bits at the output 206 of the enumerative encoder 204 corresponding to the prohibited bit pattern or to a portion of the prohibited bit pattern with a first sync pattern 214. The sync pattern may be any of the bit sequences that satisfy the MTR(3) constraint but which never occur in the 17/18 code, based upon the bases selected to implement the code, such as those in Table 1. For example, the sync pattern may be the shortest of these bit patterns. If a twenty-bit first sync pattern is selected (twenty is the maximal pattern length that can be used with twenty-eight bit accumulator/shifter), the most significant twenty bits of the encoded bits corresponding to the prohibited bit pattern are replaced at the output 206 of enumerative encoder 204. Because the replacement sync patterns are themselves MTR(3) compliant, the output 220 from the multiplexer 212 is also MTR(3) compliant. By selecting replacement sync patterns that begin and end with ‘0’, the replacement patterns are also are also compliant with MTR(3) constraints when combined with adjacent bits.

A similar replacement mechanism may be included to implement a k-constraint, preventing long runs of 0's of length k in the NRZI domain at the output of the MTR encoder (e.g., 110). A long ‘0’ run detector 222 detects runs of ‘0’ in the output 220. In some embodiments, the long ‘0’ run detector 222 is adapted to detect a run of 16 zeros, and to cause a multiplexer 224 to replace the run of ‘0’s with one of two replacement sync patterns 226 and 230, depending on the prefix of three bits immediately preceding the detected run of ‘0’s. Two such replacement sync patterns 226 and 230 are 0x7776 when the prefix is not equal to ‘111’ and 0x3BBA when the prefix equals ‘111’. The patterns are selected to provide good synchronization properties for the resulting data, to prevent false detection of other patterns. The enumerative encoding in the enumerative encoder 204, the prohibited pattern replacement in the prohibited pattern detector 210 and multiplexer 212 and the long ‘0’ run replacement in the long ‘0’ run detector 222 and multiplexer 224 yields enumeratively encoded bits 232 that may be decoded in the same order as encoding, from MSB to LSB.

Turning to FIG. 6, a flow diagram 600 shows a method for encoding data in accordance with some embodiments of the present invention. Following flow diagram 600, a stream of user data is encoded in an enumerative encoder. (Block 602) For example, the user data may be encoded using a 17/18 code rate encoder with an MTR(3) constraint. The stream of user data is analyzed in a detector for instances of prohibited patterns which would cause carry-over. (Block 604) In some embodiments, the detector detects the presence of the 28-bit pattern ‘1000000000000000000000000000’, if it is the leader, or ‘0000000000000000000000000000’, if it is following another such pattern, in the user data before the enumerative encoder. The method also includes replacing encoded bits at the output of the enumerative encoder corresponding to the prohibited patterns with a replacement sync pattern. (Block 606) The encoded bits with replacement sync patterns are analyzed in a detector for long ‘0’ runs. (Block 610) Long ‘0’ runs are replaced with at least one replacement sync pattern. (Block 612) The resulting enumeratively encoded bits satisfy j and k restraints and are suitable for decoding in the same order as they are encoded, e.g., MSB to LSB.

Turning to FIG. 7, an MTR decoder 700 is illustrated in accordance with some embodiments of the invention and which may be suitable for use, along with other embodiments, as the MTR decoder 134 of FIG. 1. The MTR decoder 700 may be used to decode enumeratively encoded bits 702 in the same order in which they were encoded, for example, MSB to LSB, without buffering all of the enumeratively encoded bits before decoding. A sync pattern detector 704 detects the presence of the sync pattern used to replace prohibited patterns (sync pattern 1) and the two sync patterns that were used to replace long ‘0’ runs in the encoded data (sync patterns 2 and 3) inserted in the enumeratively encoded bits 702 by the MTR encoder 200. If either the second or third sync patterns are detected, the original ‘0’ runs 706 and 710 are restored to the enumeratively encoded bits 702 by multiplexer 712 in place of the sync patterns. Notably, the sync pattern detector 704 may be a unitary circuit or multiple circuits for performing the functions disclosed herein. Even when performed in multiple circuits, the multiple circuits are referred to herein as a sync pattern detector 704.

The resulting encoded bits 714 are provided to an enumerative decoder 716 for decoding. Depending on the value of the input bit from encoded bits 714, ‘1’ or ‘0’, a multiplexer 720 provides either a base element from a base element memory 722 or a ‘0’ value 724 to be added to previous values in a 9-bit accumulator/shifter 726. Base element memory 722 contains the base elements of Table 1, and tracks the bit position of the incoming bit from the encoded bits 714. For each bit received, the base element index is updated, and when a modulation bit is received, the base element index is restarted. As each input bit is received, if it is a ‘1’, the appropriate base element from the base element memory 722 is provided to the 9-bit accumulator 726 by multiplexer 720. The base element is added to the existing number in the 9-bit accumulator 726, accumulating for y(n)=‘1’ values. If the input bit from the encoded bits 714 is a ‘0’, the multiplexer 720 provides a ‘0’ to the 9-bit accumulator 726, and the 9-bit accumulator 726 does not accumulate or shift, while the index to the base elements in the base element memory 722 is updated. A ‘0’ at the encoded bits 714 may also be referred to as a gap that is used to normalize the periodic base elements.

When the 9-bit accumulator 726 accumulates or adds a base element from the multiplexer 720 in response to a ‘1’ input bit, if the MSB in the 9-bit accumulator 726 is flipped or changed, the flip is carried to a 28-bit accumulator/shifter 730 by adding +1 to the LSB in the 28-bit accumulator 730. Both the 9-bit accumulator 726 and the 28-bit accumulator 730 are then left-shifted, causing the next MSB from the 9-bit accumulator 726 to be shifted into the 28-bit accumulator 730. The output 732 of the 28-bit accumulator 730 (and of the enumerative decoder 716) contains decoded user bits with prohibited patterns replaced by sync pattern 1 (e.g., 214). The sync pattern detector 704 will have detected sync pattern 1 in the enumeratively encoded bits 702, and causes a multiplexer 734 to replace the sync pattern 1 in the output 732 with the prohibited pattern 736, yielding user bits 740.

Turning to FIG. 8, a flow diagram 800 shows a method for decoding data in accordance with some embodiments of the present invention. Following flow diagram 800, a stream of enumeratively encoded bits are analyzed in a detector for sync patterns. (Block 802) Sync patterns corresponding to long ‘0’ runs are replaced in the enumeratively encoded bits with ‘0’ runs. (Block 804) Enumeratively encoded bits are processed one by one from MSB to LSB, accumulating corresponding base elements for each ‘1’ in a first accumulator and shifting from the first accumulator into a second accumulator, and shifting decoded bits from the second accumulator. (Block 806) Sync patterns corresponding to prohibited patterns are replaced in the decoded bits, yielding user bits. (Block 810) In some embodiments, in locations of sync patterns the decoded bits are obtained by decoding sync patterns, hence they can contain random errors. However, as far as the sync pattern locations, these incorrectly decoded bits can be replaced by the prohibited patterns.

The MTR encoder 200 and MTR decoder 700 form a low latency enumeration endec that does not require buffering of encoded or decoded data, while applying j-constraints and k-constraints for maximum transition runs and maximum ‘0’ runs.

Although the low latency enumeration endec disclosed herein is not limited to any particular application, several examples of applications are presented in FIGS. 9 and 10 that benefit from embodiments of the present invention. Turning to FIG. 9, a storage system 900 is illustrated as an example application of a low latency enumeration endec in accordance with some embodiments of the present invention. The storage system 900 includes a read channel circuit 902 with a low latency enumeration endec in accordance with some embodiments of the present invention. Storage system 900 may be, for example, a hard disk drive. Storage system 900 also includes a preamplifier 904, an interface controller 906, a hard disk controller 910, a motor controller 912, a spindle motor 914, a disk platter 916, and a read/write head assembly 920. Interface controller 906 controls addressing and timing of data to/from disk platter 916. The data on disk platter 916 consists of groups of magnetic signals that may be detected by read/write head assembly 920 when the assembly is properly positioned over disk platter 916. In one embodiment, disk platter 916 includes magnetic signals recorded in accordance with either a longitudinal or a perpendicular recording scheme.

In a typical read operation, read/write head assembly 920 is accurately positioned by motor controller 912 over a desired data track on disk platter 916. Motor controller 912 both positions read/write head assembly 920 in relation to disk platter 916 and drives spindle motor 914 by moving read/write head assembly 920 to the proper data track on disk platter 916 under the direction of hard disk controller 910. Spindle motor 914 spins disk platter 916 at a determined spin rate (RPMs). Once read/write head assembly 920 is positioned adjacent the proper data track, magnetic signals representing data on disk platter 916 are sensed by read/write head assembly 920 as disk platter 916 is rotated by spindle motor 914. The sensed magnetic signals are provided as a continuous, minute analog signal representative of the magnetic data on disk platter 916. This minute analog signal is transferred from read/write head assembly 920 to read channel circuit 902 via preamplifier 904. Preamplifier 904 is operable to amplify the minute analog signals accessed from disk platter 916. In turn, read channel circuit 902 decodes and digitizes the received analog signal to recreate the information originally written to disk platter 916. This data is provided as read data 922 to a receiving circuit. As part of encoding information prior to storing and decoding the received information, read channel circuit 902 processes the received signal using a low latency enumeration endec, including an enumeration encoder and decoder. Such a low latency enumeration endec may be implemented consistent with that disclosed above in relation to FIGS. 2 and 7. In some cases, the encoding and decoding may be performed consistent with the flow diagrams disclosed above in relation to FIGS. 6 and 8. A write operation is substantially the opposite of the preceding read operation with write data 924 being provided to read channel circuit 902. This data is then encoded using an enumeration encoder such as that of FIG. 2 and written to disk platter 916.

It should be noted that storage system 900 may be integrated into a larger storage system such as, for example, a RAID (redundant array of inexpensive disks or redundant array of independent disks) based storage system. It should also be noted that various functions or blocks of storage system 900 may be implemented in either software or firmware, while other functions or blocks are implemented in hardware.

Turning to FIG. 10, a wireless communication system 1000 or data transmission device including a transmitter 1002 and receiver 1004 with a low latency enumeration endec is shown in accordance with some embodiments of the present invention. Communication system 1000 includes a transmitter 1002 that is operable to transmit encoded information via a transfer medium 1006 as is known in the art. The encoded data is received from transfer medium 1006 by receiver 1004. Transmitter 1002 and receiver 804 incorporate a low latency enumeration endec. Such a low latency enumeration endec may be implemented consistent with that described above in relation to FIGS. 2 and 7. In some cases, the encoding and decoding may be done consistent with the flow diagrams discussed above in relation to FIGS. 6 and 8.

It should be noted that the various blocks discussed in the above application may be implemented in integrated circuits along with other functionality. Such integrated circuits may include all of the functions of a given block, system or circuit, or only a subset of the block, system or circuit. Further, elements of the blocks, systems or circuits may be implemented across multiple integrated circuits. Such integrated circuits may be any type of integrated circuit known in the art including, but are not limited to, a monolithic integrated circuit, a flip chip integrated circuit, a multichip module integrated circuit, and/or a mixed signal integrated circuit. It should also be noted that various functions of the blocks, systems or circuits discussed herein may be implemented in either software or firmware. In some such cases, the entire system, block or circuit may be implemented using its software or firmware equivalent. In other cases, the one part of a given system, block or circuit may be implemented in software or firmware, while other parts are implemented in hardware.

In conclusion, the present invention provides novel apparatuses, systems, and methods for encoding and decoding data in a low latency enumeration endec. While detailed descriptions of one or more embodiments of the invention have been given above, various alternatives, modifications, and equivalents will be apparent to those skilled in the art without varying from the spirit of the invention. Therefore, the above description should not be taken as limiting the scope of the invention, which is defined by the appended claims. 

What is claimed is:
 1. A storage system comprising: a storage medium operable to maintain a data set; a read/write head assembly operable to write the data set to the storage medium and to read the data set from the storage medium; a maximum transition run encoder operable to encode the data set before it is written to the storage medium and comprising: a prohibited pattern detector operable to detect a prohibited bit pattern in a stream of data bits from the data set; an enumeration encoder operable to encode the stream of data bits using a change of base in a representation of the stream of data bits with periodic bases and to constrain an encoded output to a maximum transition run to yield an encoded stream of data bits; and a prohibited pattern replacement circuit operable to replace a block of bits in the encoded data bits corresponding to at least a portion of the prohibited bit pattern in the stream of data bits with a first sync pattern to yield a second encoded stream of data bits; and a decoder operable to decode the data set after it is read from the storage medium and comprising: a sync pattern detector operable to detect the first sync pattern in a retrieved encoded stream of data bits from the data set; an enumeration decoder operable to decode the retrieved encoded stream of data bits in a same bit significance direction as the encoded stream of data bits was encoded to yield a decoded stream of data bits; and a sync pattern replacement circuit operable to replace a block of bits in the decoded stream of data bits corresponding to the first sync pattern in the encoded stream of data bits to yield a second decoded stream of data bits.
 2. The storage system of claim 1, wherein the encoder further comprises: a long zero run detector operable to detect a run of zeros exceeding a zero run limit in the second encoded stream of data bits; and a long zero run replacement circuit operable to replace the run of zeros in the second encoded stream of data bits with a second sync pattern to yield a third encoded stream of data bits.
 3. The storage system of claim 2, wherein the sync pattern detector is further operable to detect the second sync pattern in the encoded stream of data bits, wherein the decoder further comprises a second sync pattern replacement circuit operable to replace the second sync pattern in the retrieved encoded stream of data bits with a long zero run to yield the second encoded stream of data bits, and wherein the enumeration decoder is operable to decode the second encoded stream of data bits derived from the retrieved encoded stream of data bits.
 4. The storage system of claim 3, wherein the decoder comprises: a base elements memory operable to supply enumeration base elements used to encode the encoded stream of data bits; a first accumulator and shifter circuit operable to accumulate the enumeration base elements; a second accumulator and shifter circuit operable to accumulate and shift an output from the first accumulator and shifter circuit to yield the decoded stream of data bits; and a multiplexer operable to provide the enumeration base elements from the base elements memory and zero values to the first accumulator and shifter circuit.
 5. The storage system of claim 4, wherein the base elements memory is operable to index the enumeration base elements based on a position of individual bits shifted in from the second encoded stream of data bits.
 6. An encoder comprising: a prohibited pattern detector operable to detect a prohibited bit pattern in a stream of data bits; an enumeration encoder operable to encode the stream of data bits using a change of base in the representation of the stream of data bits with periodic bases and to constrain an encoded output to a maximum transition run to yield an encoded stream of data bits; and a prohibited pattern replacement circuit operable to replace a block of bits in the encoded data bits corresponding to at least a portion of the prohibited bit pattern in the stream of data bits with a sync pattern to yield a second encoded stream of data bits.
 7. The encoder of claim 6, further comprising: a long zero run detector operable to detect a run of zeros exceeding a zero run limit in the second encoded stream of data bits; and a long zero run replacement circuit operable to replace the run of zeros in the second encoded stream of data bits with a second sync pattern to yield a third encoded stream of data bits.
 8. The encoder of claim 7, wherein the long zero run detector is further operable to analyze a prefix of bits to the run of zeros, and wherein the long zero run replacement circuit is operable to replace the run of zeros in the second encoded stream of data bits with either the second sync pattern or a third sync pattern based on a value of the prefix of bits.
 9. The encoder of claim 7, wherein the prohibited pattern detector, the enumeration encoder, the prohibited pattern replacement circuit, the long zero run detector and the long zero run replacement circuit are implemented as an integrated circuit.
 10. The encoder of claim 7, wherein the prohibited pattern detector, the enumeration encoder, the prohibited pattern replacement circuit, the long zero run detector and the long zero run replacement circuit are incorporated in a storage device.
 11. The encoder of claim 7, wherein the prohibited pattern detector, the enumeration encoder, the prohibited pattern replacement circuit, the long zero run detector and the long zero run replacement circuit are incorporated in a data transmission device.
 12. The encoder of claim 6, wherein the enumeration encoder comprises a 17/18 rate code encoder.
 13. A decoder comprising: a sync pattern detector operable to detect a first sync pattern and a second sync pattern in an encoded stream of data bits, wherein the first sync pattern is a replacement for a prohibited pattern, and wherein the second sync pattern is a replacement for a long zero run; a first sync pattern replacement circuit operable to replace the second sync pattern in the encoded stream of data bits with a long zero run to yield a second encoded stream of data bits; an enumeration decoder operable to decode the second encoded stream of data bits in a same bit significance direction as the encoded stream of data bits was encoded to yield a decoded stream of data bits; and a second sync pattern replacement circuit operable to replace a block of bits in the decoded stream of data bits corresponding to the first sync pattern in the encoded stream of data bits to yield a second decoded stream of data bits.
 14. The decoder of claim 13, wherein the enumeration decoder comprises: a base elements memory operable to supply enumeration base elements used to encode the encoded stream of data bits; a first accumulator and shifter circuit operable to accumulate the enumeration base elements; a second accumulator and shifter circuit operable to accumulate and shift an output from the first accumulator and shifter circuit to yield the decoded stream of data bits; and a multiplexer operable to provide the enumeration base elements from the base elements memory and zero values to the first accumulator and shifter circuit.
 15. The decoder of claim 14, wherein the base elements memory is operable to index the enumeration base elements based on a position of individual bits shifted in from the second encoded stream of data bits.
 16. The decoder of claim 15, wherein the multiplexer is operable to provide one of the enumeration base elements to the first accumulator when a one is shifted in from the second encoded stream of data bits.
 17. The decoder of claim 16, wherein the first accumulator and shifter circuit and the second accumulator and shifter circuit are operable to add 1 to a least significant bit in the second accumulator and shifter circuit when a most significant bit in the first accumulator and shifter circuit is flipped.
 18. The decoder of claim 13, wherein the sync pattern detector, the first sync pattern replacement circuit, the enumeration decoder and the second sync pattern replacement circuit are implemented as an integrated circuit.
 19. The decoder of claim 13, wherein the sync pattern detector, the first sync pattern replacement circuit, the enumeration decoder and the second sync pattern replacement circuit are incorporated in a storage device.
 20. The decoder of claim 13, wherein the sync pattern detector, the first sync pattern replacement circuit, the enumeration decoder and the second sync pattern replacement circuit are incorporated in a data transmission device. 